<template>
  <fieldset>
    <legend>mixins</legend>
    <h1>{{ msg }}</h1>
    <h1>{{ msg1 }}</h1>
    <button @click="show">测一测</button>
    <!-- modal是mixins的子组件 -->
    <modal :visible="isshow" @on-confirm="confirm" @on-cancel="cancel">
      <template slot="alert">
        <h1>遗憾吗</h1>
      </template>
      <template slot="text">
        <h4>原来我们之间已没有任何关系</h4>
      </template>
      <!-- <template slot="button">
        <div class="btn">
          <button class="modal__button--confirm" @click="$emit('on-confirm')">
            遗憾
          </button>
          <button class="modal__button--cancel" @click="$emit('on-cancel')">
            不遗憾
          </button>
        </div>
      </template> -->
    </modal>
  </fieldset>
</template>
<script>
import shou from "./被混入对象"; //引入静悄悄的开
import modal from "../modal/模态框.vue"; //引入modal
import gong from "../混入/公共方法"; //引入公共逻辑
export default {
  mixins: [shou, gong],
  //这里面的内容可以注释掉也可以不注释掉,因为被混入的对象里面都有这段代码
  // data() {
  //   return {
  //     msg: "羞答答的玫瑰",
  //   };
  // },
  methods: {},
  components: {
    modal,
  },
};
</script>